package com.mzkj.wanjulaile.mobile.api.modules.coupon.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mzkj.wanjulaile.mobile.api.common.entity.DataEntity;
import org.hibernate.validator.constraints.Length;

import java.util.Date;

/**
 * 优惠活动Entity
 *
 * @author hgw
 * @version 2016-11-11
 */
public class PromotionActivity extends DataEntity<PromotionActivity> {

    private static final long serialVersionUID = 1L;
    private String name;        // 活动名称
    private String status;        // 状态 0:未开启  1:开启
    private Date startDate;        // 起始时间
    private Date endDate;        // 终止时间

    public PromotionActivity() {
        super();
    }

    public PromotionActivity(String id) {
        super(id);
    }

    @Length(min = 1, max = 255, message = "活动名称长度必须介于 1 和 255 之间")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Length(min = 0, max = 1, message = "状态 0:未开启  1:开启长度必须介于 0 和 1 之间")
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

}